import logging
import yagmail
def log_set():#日志
    logging.basicConfig(level=logging.DEBUG,format='%(name)s_%(module)s _%(msecs)d ',handlers=[
        logging.StreamHandler(),
        logging.FileHandler('log.txt')
    ])

def send_mail(a):#发送邮件
    mail=yagmail.SMTP(user='3221546893@qq.com',password='uwmbfszilskjchaj',host='smtp.qq.com')
    mail.send(to='3221546893@qq.com',subject='测试标题',contents='测试内容',attachments=a)

